﻿Public Class AlertGroupManager

    Private _AlertGroups As New List(Of AlertGroup)
    Public ReadOnly Property AlertGroups As IList(Of AlertGroup)
        Get
            Return _AlertGroups
        End Get
    End Property

    'Private AlertGroupsId As New Guid("8447FDED-D91E-45B9-8402-65B190051895")
    'Private AlertGroupsIds As New List(Of Guid)

    Private _DefaultAlertGroupId As New Guid("96B15C84-98D5-44D0-B218-ED369B08D465")
    Public ReadOnly Property DefaultAlertGroupId As Guid
        Get
            Return _DefaultAlertGroupId
        End Get
    End Property

    Public Sub Initialize(ByVal alertGroups As IList(Of AlertGroup))

        _AlertGroups = alertGroups

        Dim gs = From g In alertGroups
                 Where g.Id = DefaultAlertGroupId

        If gs.Count = 0 Then
            _AlertGroups.Add(New AlertGroup With {.Id = DefaultAlertGroupId})
        End If

    End Sub

End Class
